﻿<%@ Language="C#" Inherits="System.Web.Mvc.ViewUserControl<NerdDinner.Models.Dinner>" %>

<% using (Html.BeginForm("TwitterResults", "Book"))
       { %>
            <% for (int i = 0; i < Model.RSVPs.Count; i++)
               {
                   ViewData.Model.EventDate.ToString();
                   NerdDinner.NerdIdentity nerd = (NerdDinner.NerdIdentity )Context.User.Identity;
                   if (Model.RSVPs.ElementAt(i).AttendeeName == nerd.FriendlyName)
                   { %>
                        <%: Html.EditorFor(m => m.RSVPs.ElementAt(i).BookName)%>
                        <% break;
                   }
               } %>
               <input type="submit" value="Save and Search" />
    <% } %>